package com.team.abs.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.team.abs.dao.userlogin;

@Service
public class loginserviceimpl implements loginservice{
	
	@Autowired
	private userlogin userlogin;
	
	@Override
	public int login(String username,String password) {
	List<Integer> res=new ArrayList();
	res=userlogin.user_id_find(username,password);
	//res.forEach(System.out::println);
	if(res.size()>0) {
		return res.get(0);
	}
		return -1;
	}

}
